import storage from '../store/storage'
const axiosConfig = {
  timeout: 50000,

  reqInterceptors: (config) => {
    // console.log('config', config);
    // 请求之前的拦截器
    if (storage.get("token") && config.url !== '/api/login') {
      config.headers = {'Authorization': `Bearer ${storage.get("token")}`}
    }
    return config;
  },

  resInterceptors: (res) => {
    // 回复之后的拦截器
    return res;
  }

}

export default axiosConfig
